import React from "react";
import { Pie } from "@ant-design/charts";
export default class PieChart extends React.Component {
  render() {
    let data = this.props.data
    const config = {
      forceFit: true,
      pixelRatio: 3,
      title: {
        visible: true,
        text: "",
      },
      description: {
        visible: true,
        text: "",
      },
      radius: 0.8,
      data,
      angleField: "value",
      colorField: "type",
      label: {
        visible: true,
        type: "inner",
      },
    };
    return <Pie {...config} />;
  }
}
